package com.edu.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.edu.common.annotation.Excel;
import com.edu.common.core.domain.BaseEntity;

/**
 * 充值记录对象 t_recharge_record
 *
 * @author xxxx
 * @date 2023-12-22
 */
@Data
public class TRechargeRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 学生/教师 */
    @Excel(name = "学生/教师")
    private String ownerType;

    /** 持卡人 */
    @Excel(name = "姓名")
    private String ownerName;

    /** 职工编号/学号 */
    @Excel(name = "教育ID")
    private String ownerId;

    /** 充值单号 */
    @Excel(name = "充值单号")
    private String billNo;

    private String lineNo;

    /** 卡号 */
    @Excel(name = "卡号")
    private String cardNo;

    /** 充值金额 */
    @Excel(name = "充值金额")
    @NotNull(message = "充值金额不能为空")
    private Float amount;

    private Integer cardType;
    private Long classId;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("ownerName", getOwnerName())
            .append("ownerId", getOwnerId())
            .append("lineNo", getLineNo())
            .append("billNo", getBillNo())
            .append("cardNo", getCardNo())
            .append("amount", getAmount())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .toString();
    }
}
